<style type="text/css">
.storelogo img{width:3.2rem;height:3.2rem}
.merchgroup .store-star {padding:0.1rem 0 0.2rem 0;font-size:0.55rem;line-height:1rem}
.merchgroup .store-star img{height:0.66rem}
.star-on,.star-off{position:absolute;top:1rem;left:0;overflow:hidden}
.star-rate {margin-left:3.6rem}
.store-distance{float:right;color:#999}
.store-moneylimit{font-size:0.55rem}
</style>
<div class="fui-page  fui-page-current page-goods-list">
<div class="fui-content" style="top:0">
<div class="fui-header">
		<div class="fui-header-left" ng-click="access_json('select_area/')">
			<span ng-show="pagedata.pcd.district" style="font-size:0.65rem">{{pagedata.pcd.district}}</span>
			<span ng-show="!pagedata.pcd.district" style="font-size:0.65rem">{{pagedata.pcd.city || '广州市'}}</span>
			<i class="icon jinyunicon icon-moreunfold"></i>
		</div>
		<div class="title">
			<form method="post">
					<div class="searchbar searchbar-active" style="margin-left:3.2rem">
					<div class="search-input">
						<i class="icon jinyunicon icon-search" style="font-size: 1.0rem;"></i>
						<input type="search" id="search" placeholder="输入关键字..." value="">
					</div>
					</div>
			</form>
		</div>
		<div class="fui-header-right" data-nomenu="true">
			<a href="javascript:;"><i class="icon jinyunicon icon-saoyisao2" id="listblock" style="font-size: 1.0rem;"></i></a>
		</div>
</div>
<div id="carousel-container" class="carousel slide" data-role="carousel" data-param-auto="true">
			<div class="carousel-inner" role="listbox" style="height:6rem">
		<div ng-class="{'item':1,'active':$index==0}" ng-repeat="item in pagedata.setting.hdps">
			
			<a href="{{item.url}}">
				<img src="{{tomedia(item.picurl) || '../core/resource/images/banner-1.jpg'}}" style="display: block; width: 100%; height: 100%;">
			</a>
		</div>
		</div>
			<style>
					.fui-swipe-page .fui-swipe-bullet {background: {background}; opacity: {opacity};}
					.fui-swipe-page .fui-swipe-bullet.active {opacity: 1;}
			</style>
			<div id="carousel-jinyun" class="fui-swipe-page" style="padding: 0 5px; bottom: 10px; ">
				<div class="fui-swipe-bullet" ng-repeat="item in pagedata.adv" ng-class="{'active':$index==0}" data-target="#carousel-container" data-slide-to="{{$index}}"></div>
			</div>
</div>
<div class="fui-article-list template-2">
				<div class="fui-tab-scroll">
					<div class='xcontainer'>
						<span ng-class="{'item':1,'active':pagedata.op=='dish'}"><a class="jylabel jylabel-f60-0" href="javascript:" ng-click="pagedata.op='dish'">享美食</a></span>
						<span ng-class="{'item':1,'active':pagedata.op=='gohome'}"><a class="jylabel jylabel-f60-0" href="javascript:" ng-click="pagedata.op='gohome'">惠生活</a></span>
						<span ng-class="{'item':1,'active':pagedata.op=='meiye'}"><a class="jylabel jylabel-f60-0" href="javascript:" ng-click="pagedata.op='meiye'">爱美丽</a></span>
						<span ng-class="{'item':1,'active':pagedata.op=='cmsactivity'}"><a class="jylabel jylabel-f60-0" href="javascript:" ng-click="pagedata.op='cmsactivity'">爱玩乐</a></span>
						<span ng-class="{'item':1,'active':pagedata.op=='jd'}"><a class="jylabel jylabel-f60-0" href="javascript:" ng-click="pagedata.op='jd'">住酒店</a></span>
						<span ng-class="{'item':1,'active':pagedata.op=='cms360'}"><a class="jylabel jylabel-f60-0" href="javascript:" ng-click="pagedata.op='cms360'">赏美图</a></span>
					</div>
				</div>
				<div class="fui-list-group merchgroup" ng-if="pagedata.op=='dish'">
							<div class="fui-list" ng-repeat="item in pagedata.list">
								<a class="fui-list-media storelogo" href="javascript:;" ng-click="access_json('jy_dish/store//id='+item.id)">
									<img class="round" ng-src="{{tomedia(item.logo) || '../core/resource/images/nopic.jpg'}}">
								</a>
								<a class="fui-list-inner" style="margin-top:0.16rem" href="javascript:;" ng-click="access_json('jy_dish/store//id='+item.id)">
									<div class="title" style="font-size:0.76rem">{{item.title}}</div>
									<div class="store-star">
										<span class="star-on"> <img src="../core/resource/images/star-off.png"></span>
										<span class="star-off" style="width: 88%;"> <img src="../core/resource/images/star-on.png"></span>
										<span class="star-rate">4.5</span>
										<span>月售{{item.ordernum}}单</span>
									</div>
									<div class="subtitle" style="font-size:0.55rem">
										<div class="store-moneylimit">
										  <span>¥{{item.out_start}}.00 起送 </span> | 
										  <span> 配送费¥{{item.out_pay}}.00</span>
										  <span class="store-distance">{{item.distance}}km | 约38分钟</span>
										</div>
									</div>
								</a>
							</div>
				</div>
				<div ng-show="loading" class='infinite-loading'><span class='fui-preloader'></span><span style="margin-left:1.5rem"> 正在加载...</span></div> 
				<div class="fui-list-group merchgroup" ng-if="pagedata.action=='jd'">
							<div class="fui-list" ng-repeat="item in pagedata.jdlist">
								<a class="fui-list-media storelogo" href="javascript:;" ng-click="access_json('jy_jd/hotel/main/id='+item.id)">
									<img class="round" ng-src="{{tomedia(item.image) || '../core/resource/images/nopic.jpg'}}">
								</a>
								<a class="fui-list-inner" style="margin-top:0.16rem" href="javascript:;" ng-click="access_json('jy_jd/hotel/main/id='+item.id)">
									<div class="title" style="font-size:0.76rem"><span>{{item.title}}</span><span style="float:right;color:red;font-size:0.2rem"> ￥<span style="font-size:0.86rem">{{item.price}}</span><span style="color:#999">起</span></span></div>
									<div class="store-star">
										<span class="star-rate" style="margin-left:0.2rem;color:#19b955">4.5分 挺好哒-性价比高</span>
										<span>688条评价</span>
									</div>
									<div class="subtitle" style="font-size:0.55rem">
										<div class="store-moneylimit">
										  <span>距您{{item.juli}}公里</span>
										  <span class="store-distance"> 电话：{{item.mobile}}</span>
										</div>
									</div>
								</a>
							</div>
							
				</div>
				<div class="fui-list-group merchgroup" ng-if="pagedata.op=='gohome'">
							<div class="fui-list" ng-repeat="item in pagedata.serve_show">
								<a class="fui-list-media storelogo" href="javascript:;" ng-click="access_json('jy_gohome/sever/sever_detail/id='+item.id)">
									<img class="round" ng-src="{{tomedia(item.image) || '../core/resource/images/nopic.jpg'}}">
								</a>
								<a class="fui-list-inner" style="margin-top:0.16rem" href="javascript:;" ng-click="access_json('jy_gohome/sever/sever_detail/id='+item.id)">
									<div class="title" style="font-size:0.76rem">{{item.title}}</div>
									<div class="store-star">
										<span class="star-on"> <img src="../core/resource/images/star-off.png"></span>
										<span class="star-off" style="width: 88%;"> <img src="../core/resource/images/star-on.png"></span>
										<span class="star-rate">4.5</span>
										<span>服务{{item.num}}个客户</span>
									</div>
									<div class="subtitle" style="font-size:0.55rem">
										<div class="store-moneylimit">
										  <span>人均{{item.price}}</span>
										  <span class="store-distance"> 服务时间：约{{item.times}}分钟</span>
										</div>
									</div>
								</a>
							</div>
				</div>
				<div class="fui-list-group merchgroup" ng-if="pagedata.op=='meiye'">
							<div class="fui-list" ng-repeat="item in pagedata.meiye">
								<a class="fui-list-media storelogo" href="javascript:;" ng-click="access_json('jy_meiye/sever/sever_detail/id='+item.id)">
									<img class="round" ng-src="{{tomedia(item.image) || '../core/resource/images/nopic.jpg'}}">
								</a>
								<a class="fui-list-inner" style="margin-top:0.16rem" href="javascript:;" ng-click="access_json('jy_meiye/sever/sever_detail/id='+item.id)">
									<div class="title" style="font-size:0.76rem">{{item.title}}</div>
									<div class="store-star">
										<span class="star-on"> <img src="../core/resource/images/star-off.png"></span>
										<span class="star-off" style="width: 88%;"> <img src="../core/resource/images/star-on.png"></span>
										<span class="star-rate">4.5</span>
										<span>服务{{item.num}}个客户</span>
									</div>
									<div class="subtitle" style="font-size:0.55rem">
										<div class="store-moneylimit">
										  <span>人均{{item.price}}</span>
										  <span class="store-distance"> 服务时间：约{{item.times}}分钟</span>
										</div>
									</div>
								</a>
							</div>
				</div>
				
</div>
</div>
<div ng-include="sys_html('_footer')"></div>
<script type="text/javascript">
scope.pagedata.action = 'dish';
scope.loading = true;  //状态标记
//滚动加载
scope.scroll(function(){
	scope.loading = true;  //状态标记
	scope.$apply();
	setTimeout('getlist()',2000);
},false,'svposttext');
// 百度地图API功能
window.scope.location(function(res){
if(!scope.pagedata.pcd.city){
	scope.$apply(function(){
		scope.pagedata.pcd.province = res.addressComponents.province;
		scope.pagedata.pcd.city = res.addressComponents.city;
	});
}
	getlist(res.lat_lng);
});
var page = 1;
function getlist(lat_lng){
		var params = {
					'plugin':'jy_dish',
					'action':'store_list',
					'op':'list',
					'data':{
						'lat_lng':lat_lng,
					},
					'callback':function(data){
							if(data.error !=1){
							 for (var i=0;i<data.list.length;i++){
									scope.pagedata.list.push(data.list[i]);
								}
								if(page >1){
									$(".merchgroup").animate({scrollTop:0},300);
								}
								page++;
								scope.loading = false;
								scope.$apply();
							}else{
								onsole.log('error');
							};
					}
		}
		scope.post_json(params);
}
</script>
<script>
	require(['bootstrap', 'hammer'], function($, Hammer){
		$('#carousel-container').carousel();
		var mc = new Hammer($('#carousel-container').get(0));
		mc.on("panleft", function(ev) {
			$('#carousel-container').carousel('next');
		});
		mc.on("panright", function(ev) {
			$('#carousel-container').carousel('prev');
		});
	});
</script>
<div ng-include="sys_html('_footer')"></div>